package com.yzj.android.service.impl;

import com.yzj.Bean.Order;
import com.yzj.android.dao.OrderDao;
import com.yzj.android.dao.impl.OrderDaoImpl;
import com.yzj.android.service.OrderService;

import java.util.List;

public class OrderServiceImpl implements OrderService {
   private OrderDao orderDao = new OrderDaoImpl();
    @Override
    public int generateOrder(Order order) {
        return orderDao.addOrderItem(order);
    }

    @Override
    public int send(int id, String username) {
        return orderDao.updateOrdItem(id,username);
    }

    @Override
    public List<Order> orderList() {
        return orderDao.orderList();
    }

    @Override
    public List<Order> myOrder(String username) {
        return orderDao.myOrders(username);
    }
}
